﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using RPGMapa.Data;
using RPGMapa.Controls;

namespace RPGMapa.Tools
{
    public class BasicTool
    {
        public bool isDrag;
        public Vector2 initialPosition;
        public virtual void MouseMove(Tile tile, Size tileSize, Vector2 tilePos, MapPainter map)
        {
            if (isDrag)
            {
                MouseMove_Dragging(tile, tileSize, tilePos, map);
            }
            else
            {
                MouseMove_NotDragging(tile, tileSize, tilePos, map);
            }
        }
        public virtual void MouseClick(Tile tile, Size tileSize, Vector2 tilePos, MapPainter map)
        {

        }
        public virtual void MouseUp(Tile tile, Size tileSize, Vector2 tilePos, MapPainter map)
        {
            isDrag = false;
        }
        public virtual void MouseDown(Tile tile, Size tileSize, Vector2 tilePos, MapPainter map)
        {
            isDrag = true;
            initialPosition = tilePos;
        }
        public virtual void MouseMove_Dragging(Tile tile, Size tileSize, Vector2 tilePos, MapPainter map)
        {
            
        }
        public virtual void MouseMove_NotDragging(Tile tile, Size tileSize, Vector2 tilePos, MapPainter map)
        {

        }
    }
}
